<!-- Phan khai bao bien cuc bo cua the nhap ten can bo phuong xa -->
<?php
$v_staff_id = $_SESSION['staff_id'];	// Ma nhan vien ban giao
$v_staff_name = _get_item_attr_by_id($_SESSION['arr_all_staff'], $v_staff_id, 'name');		//Ten nhan vien ban giao 

//Thong tin can bo giao ho so
if(isset($_REQUEST['txt_staff_name_giver_user'])){
	$v_staff_name_giver_id = $_REQUEST['txt_staff_name_giver_user'];
}
if(isset($_REQUEST['txt_staff_name_giver_pass'])){
	$v_staff_name_giver_pass = $_REQUEST['txt_staff_name_giver_pass'];
}

$v_staff_address = '';
//$v_handle_agency_name = _get_item_attr_by_id($_SESSION['arr_all_unit'], $v_handle_agency_id , 'name');	//Ten phong tiep nhan

$v_recordtype_filter = $_SESSION['onegate_current_recordtype'];		//Loai TTHC
if(isset($_REQUEST['hdn_recordtype_filter'])){
	$v_recordtype_filter = $_REQUEST['hdn_recordtype_filter'];
}

$v_record_id_list = "";
if(isset($_REQUEST['hdn_record_id'])){
	$v_record_id_list = $_REQUEST['hdn_record_id'];	//Danh sach ho so in bien nhan
	$v_array_id = explode("," , $v_record_id_list);
}

//echo $v_recordtype_filter.'/'.$v_record_id_list;
if(sizeof($v_array_id) >1){
	$v_recordtype = $arr_all_record[0]['C_RECORDTYPE_NAME'];
	for($i=0;$i<$v_count;$i++){
		$v_record = $v_record.$arr_all_record[$i]['C_CODE'];
		if($i<$v_count -1){
			$v_record = $v_record.' , ';
		}
	}
}
else{
	$v_recordtype = $arr_single_record['C_RECORDTYPE_NAME'];
	$v_record = $arr_single_record['C_CODE'];
}

//var_dump($arr_single_record);

$v_received_date = date("d/m/Y");	//Ngay in giay bien nhan
?>
<!--bang chua tieu de cua form-->
<form action="index.php" method="post" name="f_dsp_name_receipt">
<table width="100%" cellpadding="0" cellspacing="0">
	<tr class="large_title">
		<td><?php echo $v_title; ?></td>
	</tr>
</table>
<!-- Bat cac phim: F12=true; Insert=false; Delete=false, ESC=true; Enter=true -->
<div id="hotkey" onKeyDown="javascript:process_hot_key(true,false,false,true,true);">
<!--bang chua cac text box de nhap du lieu-->

<table width="100%" class="form_table1" cellpadding="0" cellspacing="0">
	<col width="20%"><col width="70%"><col width="10%">
	<input type="hidden" name="fuseaction" value="UPDATE_SIGN_RECEIPT_RECORD">
	<!--DatCQ 12/08/2008 lay fuseaction quay lai trang-->
	<input type="hidden" name="back_fuseaction" value="<?php echo $fuseaction;?>">
	<input type="hidden" name="hdn_record_id" value="<?php echo $v_array_id[0];?>">
	<input type="hidden" name="hdn_record_id_list" value="<?php echo $v_record_id_list;?>">
	<input type="hidden" name="hdn_staff_id" value="<?php echo $v_staff_id;?>">
	<input type="hidden" name="hdn_worktype" value="<?php echo $v_worktype;?>">
		
	<tr>
		<td class="normal_label"><?php echo _CONST_RECORDTYPE_LABEL; ?></td>
		<td class="normal_label"><?php echo $v_recordtype; ?></td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo _CONST_RECORD_ID_LABEL; ?></td>
		<td class="normal_label"><?php echo $v_record; ?></td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo _CONST_STAFF_NAME_LABEL; ?></td>
		<td class="normal_label"><?php echo $v_staff_name; ?></td>
	</tr>
	<tr >
		<td class="normal_label"><?php echo _CONST_WORK_DATE_LABEL; ?></td>
		<td>
			<input class="normal_date_textbox" name="txt_receive_date" type="text" value="<?php echo $v_received_date; ?>" optional="true" isdate="true" message="<?php echo _CONST_WORK_DATE_MESSAGE;?>" onKeyDown="change_focus(document.forms(0),this)" readonly>
		</td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo _CONST_STAFF_NAME_GIVER_LABEL; ?></td>
		<td>
			T&agrave;i kho&#7843;n : &nbsp;
			<input name="txt_staff_name_giver_user" type="text" value="<?php echo $v_staff_name_giver_user; ?>" optional="true" onKeyDown="change_focus(document.forms(0),this)" style="width:20%"> &nbsp;&nbsp;&nbsp;&nbsp;
			M&#7853;t kh&#7849;u : &nbsp;
			<input name="txt_staff_name_giver_pass" type="password" value="<?php echo $v_staff_name_giver_pass; ?>" optional="true" onKeyDown="change_focus(document.forms(0),this)" style="width:20%"> &nbsp;&nbsp;&nbsp;&nbsp;
		</td>
	</tr>
	<tr>
		<td class="normal_label"><?php echo _CONST_SIGN_RECORD_LABEL;?><small class="normal_starmark"></small></td>
		<td colspan="5" ><textarea  <?php echo $v_readonly;?> name="txt_result" style="width:99% " class="normal_textarea" value="" rows="3" message="<?php echo CONST_RESULT_MESSAGE; ?>" optional="<?php echo CONST_RESULT_OPTIONAL; ?>"><?php echo  _replace_bad_char($v_result); ?></textarea></td>
	</tr>
	<tr>
		<td class="normal_label"><small class="normal_starmark"></small></td>
		<td colspan="5" >&nbsp;</td>
	</tr>
</table>
<!--bang chua cac button-->
<table width="100%" >
	<tr>
		<td align="center" width="100%" height="40" valign="bottom">
			<input type="button" name="btn_save"  class="normal_button" value="<?php echo CONST_ACCEPT_BUTTON;?>" onClick="btn_save_onclick('UPDATE_SIGN_RECEIPT_RECORD');" onKeyDown="change_focus(document.forms(0),this)">
			<input type="button" name="btn_back" class="normal_button" value="<?php echo CONST_NO_ACCEPT_BUTTON;?>" onClick="btn_back_onclick('<?php echo $_GO_BACK?>');" onKeyDown="change_focus(document.forms(0),this)">	
		</td>
	</tr>
</table>					
</div>
</form>
<script language="JavaScript">
	set_focus(document.forms(0));
</script>
